<!DOCTYPE html>
<html lang="en">

<head>

</head>

<body>
<div id="wrapper">
    <ol class="breadcrumb">
        <li><a href="javascript:void(0)">系统管理</a>
        </li>
        <li class="active">用户管理</li>
    </ol>

    <div class="form-inline">
        <div class="form-group">
            <label for="tisname">图片标题</label>
            <input type="text" class="form-control" id="tisname">
        </div>
        <button id="btnUserQuery" type="button" class="btn btn-default">查询</button>
    </div>
    <br>

    <div class="row">
        <div class="col-lg-12">

            <div class="panel panel-default">
                <div class="panel-heading">
                    用户列表
                    <button type="button" onclick="onUserAddClick()" class="btn btn-default">新建</button>
                </div>
                <!-- /.panel-heading -->
                <div class="panel-body">
                    <div class="table-responsive">
                        <table class="table table-striped table-bordered table-hover">
                            <thead>
                            <tr>
                                <th>编号</th>
                                <th>图片标题</th>
                                <th>图片分类</th>
                                <th>图片地址</th>
                                <th>操作</th>
                            </tr>
                            </thead>
                            <tbody id="user-placeholder">

                            </tbody>
                        </table>
                    </div>
                    <!-- /.table-responsive -->
                    <div class="center-block" style="width: 350px">
                        <ul id="paginator"></ul>
                    </div>
                </div>
                <!-- /.panel-body -->
            </div>
            <!-- /.panel -->
        </div>
    </div>
</div>

<div id="userModal" class="modal fade">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal">
                    <span aria-hidden="true">&times;</span><span class="sr-only">关闭</span>
                </button>
                <h4 class="modal-title">用户</h4>
            </div>
            <div class="modal-body">
                <div class="form-horizontal" id="user_form">
                    <div class="form-group">
                        <label for="picId" class="col-sm-2 control-label">用户 ID</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="picId" check-type="required">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="picName" class="col-sm-2 control-label">图片名称</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="picName" check-type="required">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="category" class="col-sm-2 control-label">图片类别</label>
                        <div class="col-sm-9">
                            <select id="category" class="form-control"  style="width:150px;"></select>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="picform" class="col-sm-2 control-label">图片上传</label>
                        <div class="col-sm-9">
                            <form onsubmit="return false;" id="picform">
                                <input type="file" name="upload" value="pic file" id="picfile">
                                <input type="text" name="upType" value="storage" style="display:none;">
                                <button type="submit" onclick="sendpic()" class="shangchuan" >上传</button>
                            </form>
                        </div>
                        <div style="text-align:center; padding:10px 0 5px; ">
                            <img id="picShow" src="" class="imgsk2" style="width: 100px;"/>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="picPath" class="col-sm-2 control-label">图片路径</label>
                        <div class="col-sm-9">
                            <input type="text" class="form-control" id="picPath" check-type="required" readonly="readonly">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="introduce" class="col-sm-2 control-label">图片介绍</label>
                        <div class="col-sm-9">
                            <textarea type="text" class="form-control" id="introduce" check-type="required"/>
                        </div>
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button onclick="onUserSaveClick()" type="button" class="btn btn-primary" id="user_buttonid">保存</button>
            </div>
        </div>
        <!-- /.modal-content -->
    </div>
    <!-- /.modal-dialog -->
</div>
<!-- /.modal -->

<script id="user-template" type="text/x-handlebars-template">
    {{#datas}}
    <tr>
        <td>{{id}}</td>
        <td>{{title}}</td>
        <td>{{category}}</td>
        <td>{{picbig}}</td>
        <td>
            <button class="btn-link" onclick="onUserUpdateClick('{{id}}')">修改</button>
            <button class="btn-link" onclick="onDeleteClick('{{id}}')">删除</button>
        </td>
    </tr>
    {{/datas}}
</script>

<script type="text/javascript" src="../js/info/tukuAdmin.js"></script>
</body>

</html>
